package com.ruoyi.web.utils;

import cn.hutool.core.date.DateUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.ruoyi.web.TemuEvents.domain.TemuEvents;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;

public class test {
    public static void main(String[] args) {

        List<TemuEvents> list=new ArrayList<>();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        LocalDate endDate = LocalDate.now();
        LocalDate startDate = endDate.minusDays(29); // 包含今天共30天

        String cookie = "api_uid=Ct3WrmiGTC6AFQBHijBqAg==; _nano_fp=XpmyXqEqXpmbX5TbnT_EjbIXdYFpqvZPzGFYTYJG; x-hng=lang=zh-CN&domain=agentseller.temu.com; _bee=KutBMyRHgWZj4fwUIuD2u78iXAOYzanS; njrpl=KutBMyRHgWZj4fwUIuD2u78iXAOYzanS; dilx=GMUFgFmIaV-ryi1OpWy4M; hfsc=L3yPe4oz7Dr+0J/Jfw==; mallid=634418221988750; user_uin=BDFUT4ZPMR7HUT43PPTDHAT23BLFVQVJ6EZKQ3A5; region=37; AccessToken=QCQFCUQJTKF7KXNYW3POMDMIB3UANVJBWHAF7PNMEVYZAAQCU62A011025777bcb; isLogin=1754476126283; gmp_temu_token=RL5texWtX5fqsC2/W/zECcRzjCl8todLEW1tclQ5Go2VuetIv8bMvtvcgXHH6x9U85beu3ozytiOT8LSh2nTbzJPDbpXwaVxlSY8hbkVkQiGyy04jPuXQWLSLO2qEEKhkjLhJgAlK4dAIoay/9Wl2qwH0CDuDuMYqwHnaWnI8Jo; seller_temp=N_eyJ0IjoibnJaZVdCajNONi9uSCtmRFJMZEFreFFHZTl3YmJJSnAzRmc5VEtyTm44WTJqNU81TVlQcG41UHlEMzROWXY5T013Ty9SdFRIU3FuOTN4em53WjZlR3c9PSIsInYiOjEsInMiOjEwMDAxLCJ1IjoyMzgzOTAyNjg5MTc0Nn0=";
        String mallid = "634418221988750";

        String start = startDate.format(formatter);
        String end = endDate.format(formatter);

        String bow=TemuApi.product_Wh_Head +"\""+start+"\""+TemuApi.product_Wh_Page+"\""+end+"\""+TemuApi.product_Wh_Warehouse+1+TemuApi.product_Wh_end;
        String resp = Httpapi.post(TemuApi. productHistoryData, cookie, bow, mallid);

        //解析JSON数据



    }
}
